package com.wr.vehicle.service.impl;

import java.util.List;
import com.wr.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wr.vehicle.mapper.CheckMapper;
import com.wr.vehicle.domain.Check;
import com.wr.vehicle.service.ICheckService;

/**
 * 车辆审核Service业务层处理
 * 
 * @author art8173
 * @date 2024-11-24
 */
@Service
public class CheckServiceImpl implements ICheckService 
{
    @Autowired
    private CheckMapper checkMapper;

    /**
     * 查询车辆审核
     * 
     * @param registerId 车辆审核主键
     * @return 车辆审核
     */
    @Override
    public Check selectCheckByRegisterId(Long registerId)
    {
        return checkMapper.selectCheckByRegisterId(registerId);
    }

    /**
     * 查询车辆审核列表
     * 
     * @param check 车辆审核
     * @return 车辆审核
     */
    @Override
    public List<Check> selectCheckList(Check check)
    {
        return checkMapper.selectCheckList(check);
    }

    /**
     * 新增车辆审核
     * 
     * @param check 车辆审核
     * @return 结果
     */
    @Override
    public int insertCheck(Check check)
    {
        check.setCreateTime(DateUtils.getNowDate());
        return checkMapper.insertCheck(check);
    }

    /**
     * 修改车辆审核
     * 
     * @param check 车辆审核
     * @return 结果
     */
    @Override
    public int updateCheck(Check check)
    {
        check.setUpdateTime(DateUtils.getNowDate());
        return checkMapper.updateCheck(check);
    }

    /**
     * 批量删除车辆审核
     * 
     * @param registerIds 需要删除的车辆审核主键
     * @return 结果
     */
    @Override
    public int deleteCheckByRegisterIds(Long[] registerIds)
    {
        return checkMapper.deleteCheckByRegisterIds(registerIds);
    }

    /**
     * 删除车辆审核信息
     * 
     * @param registerId 车辆审核主键
     * @return 结果
     */
    @Override
    public int deleteCheckByRegisterId(Long registerId)
    {
        return checkMapper.deleteCheckByRegisterId(registerId);
    }
}
